package com.zenika.zenbinding.sample.model;

import com.zenika.zenbinding.client.model.BusinessObject;

import com.google.gwt.core.client.GWT;

public class City implements BusinessObject {

	private String name;

	public City() {

	}

	public City(String name) {
		this.name = name;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((this.name == null) ? 0 : this.name.hashCode());
		return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!GWT.getTypeName(this).equals(GWT.getTypeName(obj)))
			return false;
		final City other = (City) obj;
		if (this.name == null) {
			if (other.name != null)
				return false;
		} else if (!this.name.equals(other.name))
			return false;
		return true;
	}

}
